<script type="text/ng-template" id="dialog1">
<div class="nav-modify">
  <p>添加导航信息</p>
  <div ng-controller="ModuleNavCtrl">
    <form name="form3">
      <div class="form-group" ng-repeat="nav in navs">
        <input type="text" name="name" ng-model="nav.name"  placeholder="导航名称" />
        <input type="url" name="link" ng-model="nav.link" placeholder="链接" />
        <button class="del" ng-click="del($index)" ng-disabled="navs.length < 5">×</button>
        <button class="up" ng-click="up($index)" ng-hide="$first">↑</button>
        <button class="down" ng-click="down($index)" ng-hide="$last">↓</button>
      </div>
      <button class="add" ng-disabled="navs.length > 7" ng-click="add()">+</button>
      <div class="form-action">
        <span class="btn" ng-click="saveDialogForm(form3, 'nav') && closeThisDialog()" >保存</span> <a class="cancel" href="javascript:" ng-click="closeThisDialog()">取消</a>
      </div>
    </form>
  </div>
</div>
</script>

<!--填写VM模板信息 -> 文章类 -->
<script type="text/ng-template" id="dialog2">
  <div class="title">填写模块信息</div>
  <div>
    <form name="form2" novalidate>
      <div class="form-group" ng-if="title">
        <div>标题名称（title）</div>
        <div><input type="text" name="title" ng-model="title" placeholder="title"></div>
      </div>
      <div class="form-group" ng-if="channelid">
        <div>频道ID（channelid 4位数字）</div>
        <div><input type="text" name="channelid" ng-model="channelid" placeholder="channelid" required></div>
      </div>
      <div class="form-group" ng-if="setid">
        <div>图集ID（setid）</div>
        <div><input type="text" name="setid" ng-model="setid" placeholder="setid" required></div>
      </div>
      <div class="form-group" ng-if="topicid">
        <div>读取地址（topicid）</div>
        <div><input type="text" name="topicid" ng-model="topicid" placeholder="栏目ID"></div>
      </div>

      <div class="form-group" ng-if="vid">
        <div>视频ID（vid）</div>
        <div><input type="text" name="vid" ng-model="vid" placeholder="vid" required></div>
      </div>
      <div class="form-group" ng-if="coverpic">
        <div>视频封面（coverpic）</div>
        <div><input type="text" name="coverpic" ng-model="coverpic" placeholder="coverpic"></div>
      </div>
      <div class="form-group" ng-if="listnum">
        <div>显示条数（listnum）</div>
        <div><input type="number" name="listnum" ng-model="listnum" placeholder="显示条数" required></div>
      </div>
      <div class="form-group" ng-if="img">
        <div>请输入图片地址</div>
        <div><input type="text" name="img" ng-model="img" required></div>
      </div>
      <div class="form-group" ng-if="morelink">
        <div>查看更多链接（不填写时，隐藏"查看更多"按钮）</div>
        <div><input type="text" name="morelink" ng-model="morelink" placeholder="http://"></div>
      </div>
      <div class="form-action">
        <button class="btn" ng-disabled="!form2.$valid" ng-click="saveDialogForm(form2) && closeThisDialog()" >保存</button> <a class="cancel" href="javascript:" ng-click="closeThisDialog()">取消</a>
      </div>
    </form>
  </div>
</script>

<!--增加模块-->
<script type="text/ng-template" id="dialog3">
  <div ng-controller="ModuleCtrl">
    <ul class="tab clearfix" >
      <li ng-class="{active:isActiveTab(mod.url), disabled: !mod.usable && mod.url !== 'module.custom'}" ng-repeat="mod in modules" ng-click="onClickTab(mod)">{{mod.title}}</li>
    </ul>
    <div class="tab-content clearfix">
      <div class="modules-list" ng-show="!isActiveTab('module.custom') && !isActiveTab('module.nav')">
        <ul class="modules-list-1">
          <li ng-repeat="subMod in subModules" ng-click="choose(subMod)" ng-if="$even" ng-class="{active: chosenModule == subMod}">
            <img ng-src="{{subMod.thumbnail}}" width="393" >
          </li>
        </ul>
        <ul class="modules-list-2">
          <li ng-repeat="subMod in subModules" ng-click="choose(subMod)" ng-if="$odd" ng-class="{active: chosenModule == subMod}">
            <img ng-src="{{subMod.thumbnail}}" width="393" >
          </li>
        </ul>
      </div>
      <!-- 导航 -->
      <div class="module-nav" ng-show="isActiveTab('module.nav')">
        <ul>
          <li ng-repeat="subMod in subModules" ng-click="choose(subMod)" ng-class="{active: chosenModule == subMod}">
            <img ng-src="{{subMod.thumbnail}}">
          </li>
        </ul>
      </div> 
      <!-- 自定义模块 -->
      <div class="module-custom" ng-show="isActiveTab('module.custom')">
        <div class="help-link">
          <a href="https://git.ws.netease.com/ybduan/xocean/wikis/home" target="_blank">如何自定义模块？</a>
        </div>
        <textarea ng-model="chosenModule.html">
        </textarea>
      </div>
      <div class="btn-area">
        <span class="btn" ng-click="chooseModule() && closeThisDialog()">添加</span><a href="javascript:" ng-click="cancel() && closeThisDialog()">取消</a>
      </div>
    </div>
  </div>
</script>

<!--首页模板大图-->
<script type="text/ng-template" id="dialog4">
  <div class="ngdialog-title">
    <div class="center-block">
      <span class="title">{{tmpl.name}}</span>
      <span class="btns">
        <!--
        <a class="btn gray" ng-click="closeThisDialog()" ng-href="#/{{TOPICID}}/wizard/step_2?templateId={{tmpl.id}}">自定义模板</a>
        -->
        <a ng-href="#/{{TOPICID}}/wizard/step_2?templateId={{tmpl.id}}" ng-click="closeThisDialog()"class="btn">立即使用</a>
      </span>
    </div>
  </div>
  <a class="prev" ng-click="prev()"><</a>
  <a class="next" ng-click="next()">></a>
  <div>
    <img width="100%" ng-src="{{tmpl.thumbnail}}">
  </div>
</script>


<!--更改头图样式-->
<script type="text/ng-template" id="dialog6">
  <div ng-controller="BannersCtrl">
    <div class="title">更改头图样式</div>
    <ul class="styles-list clearfix">
      <li ng-repeat="banner in banners" ng-click="saveStyle(banner) && closeThisDialog()">
        <img ng-src="{{banner.thumbnail}}" width="433" height="180">
      </li>
    </ul>
  </div>
</script>

<!--首页视频-->
<script type="text/ng-template" id="dialog7">
  <video id="myVideo" width="890" controls>
    <source src="http://flv.bn.netease.com/videolib3/1411/04/tbLCV0726/HD/tbLCV0726-mobile.mp4" type="video/mp4">
    Your browser does not support the video tag.
  </video>
</script>

